package com.mistyrain.controller;

import com.mistyrain.entity.Account;
import com.mistyrain.mapper.AdminMapper;
import com.mistyrain.mapper.UserMapper;
import com.mistyrain.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/account")
public class AccountHandler {

    @Autowired
    private AccountService accountService;

    @GetMapping("/login/{username}/{password}/{type}")
    public Account login(@PathVariable("username") String username,@PathVariable("password") String password,@PathVariable("type") String type){
        return accountService.login(username, password,type);
    }
}
